#ifndef _HCC_ERROR_CODE_DRV_PER_CAN_H_
#define _HCC_ERROR_CODE_DRV_PER_CAN_H_

#include "ofc_types.h"
#include "hcc_error_code.h"
#include "hcc_error_code_drv.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_DRV_PER_CAN_ERROR(error_code) (int)HCC_MAKE_DRIVER_ERROR(kHccDrvPerCan, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_DRV_PER_CAN_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_DRIVER_ERROR(kHccDrvPerCan, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 外设Can驱动:外设Can驱动
 */
enum THccDrvPerCanTag
{
	kHccDrvPerCanSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccDrvPerCanComm	=	HCC_MAKE_DRV_PER_CAN_ERROR(0),			///<通讯错误
	kHccDrvPerCanParam	=	HCC_MAKE_DRV_PER_CAN_ERROR(1),			///<参数错误
	kHccDrvPerCanCallBack	=	HCC_MAKE_DRV_PER_CAN_ERROR(2),			///<回调函数未设置
	kHccDrvPerCanExist	=	HCC_MAKE_DRV_PER_CAN_ERROR(3),			///<芯片不存在
};
typedef enum THccDrvPerCanTag THccDrvPerCan;


typedef Int32 THccDrvPerCanLine;
#define kHccDrvPerCanSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccDrvPerCanCommLine	HCC_MAKE_DRV_PER_CAN_ERROR_LINE(0)	///<通讯错误
#define kHccDrvPerCanParamLine	HCC_MAKE_DRV_PER_CAN_ERROR_LINE(1)	///<参数错误
#define kHccDrvPerCanCallBackLine	HCC_MAKE_DRV_PER_CAN_ERROR_LINE(2)	///<回调函数未设置
#define kHccDrvPerCanExistLine	HCC_MAKE_DRV_PER_CAN_ERROR_LINE(3)	///<芯片不存在

//旧版本适配补丁
typedef THccDrvPerCan TPerCanErrorCode;

#define kPerCanErrorCodeSuccess kHccDrvPerCanSuccess
#define kPerCanErrorCodeComm kHccDrvPerCanComm
#define kPerCanErrorCodeParam kHccDrvPerCanParam
#define kPerCanErrorCodeCallBack kHccDrvPerCanCallBack
#define kPerCanErrorCodeExist kHccDrvPerCanExist

#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_DRV_PER_CAN_H_
/**
 * @
 */
